import { BaseEntity } from "../../base/entity/base";
import { Column, Entity } from "typeorm";

@Entity('comment_invite', { comment: '评论邀请' })
export class CommentInviteEntity extends BaseEntity {

    @Column({ comment: '邀请者ID', unique: true })
    providerId: number;

    @Column({ comment: '邀请码', length: 16, unique: true, nullable: true })
    inviteCode: string;

    @Column({ comment: '邀请时间', type: 'datetime', default: () => 'CURRENT_TIMESTAMP' })
    inviteTime: Date;

}